package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("t_speak")
public class SpeakBean {
    @TableId(value = "pk_speakId",type = IdType.AUTO)
    private Integer id;
    @TableField("fk_userId")
    private Integer userId;
    @TableField("fk_productId")
    private Integer productId;
    @TableField("s_content")
    private String content;
    @TableField(exist = false)
    private UserBean user;
    @TableField(exist = false)
    private ProductBean product;

    public SpeakBean(Integer userId, Integer productId, String content) {
        this.userId = userId;
        this.productId = productId;
        this.content = content;
    }

    public SpeakBean() {
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "SpeakBean{" +
                "id=" + id +
                ", userId=" + userId +
                ", productId=" + productId +
                ", content='" + content + '\'' +
                ", user=" + user +
                ", product=" + product +
                '}';
    }
}
